# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=koko
pkgver=23.04.1
pkgrel=1
pkgdesc='Image gallery application'
url='https://apps.kde.org/koko/'
arch=(x86_64)
license=(GPL LGPL)
groups=(kde-applications kde-graphics)
depends=(kirigami2 kdeclarative qt5-location kfilemetadata kquickimageeditor)
makedepends=(extra-cmake-modules)
source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig}
        https://download.geonames.org/export/dump/cities1000.zip
        https://download.geonames.org/export/dump/admin1CodesASCII.txt
        https://download.geonames.org/export/dump/admin2Codes.txt)
sha256sums=('f7a5a9504add173e03a8395e4876218c00bb594d73f381dab8ec03b10acfb06d'
            'SKIP'
            'b29887d1d1a0661ab74060038db0c9f91487f91e3be6cc14d0eee09692bb95e4'
            '25c32c270b52467a3e59158c731bff2144314f8863047ac5014755babbe79f25'
            'fa975aa97cd059ae97c44822356ee35f770bc9ee7a3ce774ba7cd49cc30aa563')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87  # Christoph Feck <cfeck@kde.org>
              D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org>

prepare() {
  cp -L cities1000.zip admin1CodesASCII.txt admin2Codes.txt $pkgname-$pkgver/src
}

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DBUILD_TESTING=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
